﻿using BestPrice.Core;
using BestPrice.Core.Manager;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace BestPrice.WcfService
{
    public class CategoryService : ICategoryService
    {
        public List<Common.Category> GetCategoryList()
        {
            var mgr = ManagerFactory.Locate<ICategoryManager>();
            return mgr.GetAll();
        }

        public List<Common.Category> GetCategoryTestList()
        {
            Common.Formatter formatter = new Common.Formatter()
            {
                BeginDetail = "BeginDetail",
                BeginImage = "BeginImage"
            };
            Common.WebSite webSite = new Common.WebSite() 
            {
                BaseUrl = "BaseUrl",
                Description = "Description",
                Formatter =  formatter
            };
            Common.Category category = new Common.Category()
            {
                Description = "Description",
                ID = 1,
                WebSites = new List<Common.WebSite>(1) { webSite }
            };
            return new List<Common.Category>(1) { category };
        }
    }
}
